<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form id="form_grade_turma" action="<?php echo url_for('grade_turma/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_grade_turma='.$form->getObject()->getIdGradeTurma() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_grade_turma" value="<?php echo $form->getObject()->getIdGradeTurma() ?>" />
<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
  <table class="form">
    <tbody>
      <tr><th colspan="2" class="title">Dados grade_turma</th></tr>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['id_turma_ano_letivo']->renderLabel() ?></th>
        <td>
          <?php echo $form['id_turma_ano_letivo'] ?>
          <?php echo form_error('grade_turma[id_turma_ano_letivo]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['dt_grade']->renderLabel() ?></th>
        <td>
          <?php echo $form['dt_grade'] ?>
          <?php echo form_error('grade_turma[dt_grade]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['id_docente']->renderLabel() ?></th>
        <td>
          <?php echo $form['id_docente'] ?>
          <?php echo form_error('grade_turma[id_docente]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_hora_inicio']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_hora_inicio'] ?>
          <?php echo form_error('grade_turma[nu_hora_inicio]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_hora_fim']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_hora_fim'] ?>
          <?php echo form_error('grade_turma[nu_hora_fim]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['id_disciplina']->renderLabel() ?></th>
        <td>
          <?php echo $form['id_disciplina'] ?>
          <?php echo form_error('grade_turma[id_disciplina]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['created_at']->renderLabel() ?></th>
        <td>
          <?php echo $form['created_at'] ?>
          <?php echo form_error('grade_turma[created_at]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['updated_at']->renderLabel() ?></th>
        <td>
          <?php echo $form['updated_at'] ?>
          <?php echo form_error('grade_turma[updated_at]'); ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>

<?php
	comandos_form(
		link_to(
			':: Listar ::',
			'grade_turma/list',
			array('class' => 'btn btn-info')
		),
		button_to_function(
			':: Salvar ::',
			"$('#form_grade_turma').submit()",
			array('class' => 'btn btn-info')
		)
	);
?>